import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '居民id',
    dataIndex: 'id',
    defaultHidden: true,
    align: 'center',
    width: 200,
  },
  {
    title: '户口类型（农村，城镇）',
    dataIndex: 'hkType',
    
        customRender:({ record }) =>{
        const options = [
            {
                label: '农村',
                value: '农村',
            },
            {
                label: '城镇',
                value: '城镇',
            },
        ];
        return options.find((op) => op.value === record.hkType)?.label || '暂无';
        },
    align: 'center',
    width: 200,
  },
  {
    title: '组号',
    dataIndex: 'groupNumber',
    
    align: 'center',
    width: 200,
  },
  {
    title: '户口本号',
    dataIndex: 'hkbNumber',
    
    align: 'center',
    width: 200,
  },
  {
    title: '姓名',
    dataIndex: 'name',
    
    align: 'center',
    width: 200,
  },
  {
    title: '曾用名',
    dataIndex: 'formerName',
    
    align: 'center',
    width: 200,
  },
  {
    title: '户主',
    dataIndex: 'householder',
    
    align: 'center',
    width: 200,
  },
  {
    title: '户主关系',
    dataIndex: 'householderRelation',
    
    align: 'center',
    width: 200,
  },
  {
    title: '身份证',
    dataIndex: 'idCard',
    
    align: 'center',
    width: 200,
  },
  {
    title: '签发机关',
    dataIndex: 'issuingAuthority',
    
    align: 'center',
    width: 200,
  },
  {
    title: '签发日期',
    dataIndex: 'issuingDate',
    
    align: 'center',
    width: 200,
  },
  {
    title: '出生日期',
    dataIndex: 'birthDate',
    
    align: 'center',
    width: 200,
  },
  {
    title: '出生地',
    dataIndex: 'birthPlace',
    
    align: 'center',
    width: 200,
  },
  {
    title: '性别',
    dataIndex: 'sex',
    
    align: 'center',
    width: 200,
  },
  {
    title: '身高（cm）',
    dataIndex: 'height',
    
    align: 'center',
    width: 200,
  },
  {
    title: '血型（A/B/AB/O/熊猫）',
    dataIndex: 'bloodType',
    
    align: 'center',
    width: 200,
  },
  {
    title: '健康状况',
    dataIndex: 'health',
    
    align: 'center',
    width: 200,
  },
  {
    title: '户籍所在地',
    dataIndex: 'hjAddr',
    
    align: 'center',
    width: 200,
  },
  {
    title: '民族（汉/黎等）',
    dataIndex: 'nation',
    
    align: 'center',
    width: 200,
  },
  {
    title: '籍贯',
    dataIndex: 'nativePlace',
    
    align: 'center',
    width: 200,
  },
  {
    title: '现居地点',
    dataIndex: 'nowAddr',
    
    align: 'center',
    width: 200,
  },
  {
    title: '其他地址',
    dataIndex: 'otherAddr',
    
    align: 'center',
    width: 200,
  },
  {
    title: '联系电话',
    dataIndex: 'contactNumber',
    
    align: 'center',
    width: 200,
  },
  {
    title: '文化程度',
    dataIndex: 'cultureType',
    
    align: 'center',
    width: 200,
  },
  {
    title: '婚姻状况',
    dataIndex: 'maritalStatus',
    
        customRender:({ record }) =>{
        const options = [
            {
                label: '已婚',
                value: '已婚',
            },
            {
                label: '未婚',
                value: '未婚',
            },
            {
                label: '离婚',
                value: '离婚',
            },
            {
                label: '丧偶',
                value: '丧偶',
            },
        ];
        return options.find((op) => op.value === record.maritalStatus)?.label || '暂无';
        },
    align: 'center',
    width: 200,
  },
  {
    title: '兵役状况',
    dataIndex: 'militaryServiceStatus',
    
    align: 'center',
    width: 200,
  },
  {
    title: '宗教信仰',
    dataIndex: 'religion',
    
    align: 'center',
    width: 200,
  },
  {
    title: '职业（xx）',
    dataIndex: 'profession',
    
    align: 'center',
    width: 200,
  },
  {
    title: '政治面貌',
    dataIndex: 'politicsStatus',
    
    align: 'center',
    width: 200,
  },
  {
    title: '备注',
    dataIndex: 'remark',
    
    align: 'center',
    width: 200,
  },
  {
    title: '户籍状态',
    dataIndex: 'hjStatus',
    
    align: 'center',
    width: 200,
  },
  {
    title: '登记日期',
    dataIndex: 'registDate',
    
    align: 'center',
    width: 200,
  },
  {
    title: '家庭id',
    dataIndex: 'familyId',
    
        customRender:({ record }) =>{
        const options = [
        ];
        return options.find((op) => op.value === record.familyId)?.label || '暂无';
        },
    align: 'center',
    width: 200,
  },
  {
    title: '是否困难群体',
    dataIndex: 'isDifficultGroup',
    
    align: 'center',
    width: 200,
  },
  {
    title: '年龄',
    dataIndex: 'age',
    
    align: 'center',
    width: 200,
  },
  {
    title: '就业状况（失业、在业）',
    dataIndex: 'employmentStatus',
    
    align: 'center',
    width: 200,
  },
  {
    title: '是否残疾（0-false 1-true）',
    dataIndex: 'isDisability',
    
        customRender:({ record }) =>{
        const options = [
            {
                label: '是',
                value: '0',
            },
            {
                label: '否',
                value: '1',
            },
        ];
        return options.find((op) => op.value === record.isDisability)?.label || '暂无';
        },
    align: 'center',
    width: 200,
  },
  {
    title: '残疾等级（A/B/C/暂无等）',
    dataIndex: 'disabilityLevel',
    
    align: 'center',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'hkType',
    label: '户口类型（农村，城镇）',
    component: 'Select',
    componentProps: {
        placeholder: '请选择户口类型（农村，城镇）',
        options:[
            {
                label: '农村',
                value: '农村',
            },
            {
                label: '城镇',
                value: '城镇',
            },
        ]
    },
    colProps: { span: 6 },
  },
  {
    field: 'name',
    label: '姓名',
    component: 'Input',
    componentProps: {
        placeholder: '请输入姓名',
    },
    colProps: { span: 6 },
  },
  {
    field: 'formerName',
    label: '曾用名',
    component: 'Input',
    componentProps: {
        placeholder: '请输入曾用名',
    },
    colProps: { span: 6 },
  },
  {
    field: 'idCard',
    label: '身份证',
    component: 'Input',
    componentProps: {
        placeholder: '请输入身份证',
    },
    colProps: { span: 6 },
  },
  {
    field: 'birthPlace',
    label: '出生地',
    component: 'Input',
    componentProps: {
        placeholder: '请输入出生地',
    },
    colProps: { span: 6 },
  },
  {
    field: 'hjAddr',
    label: '户籍所在地',
    component: 'Input',
    componentProps: {
        placeholder: '请输入户籍所在地',
    },
    colProps: { span: 6 },
  },
  {
    field: 'maritalStatus',
    label: '婚姻状况',
    component: 'RadioGroup',
    componentProps: {
        placeholder: '请选择婚姻状况',
        options:[
            {
                label: '已婚',
                value: '已婚',
            },
            {
                label: '未婚',
                value: '未婚',
            },
            {
                label: '离婚',
                value: '离婚',
            },
            {
                label: '丧偶',
                value: '丧偶',
            },
        ]
    },
    colProps: { span: 6 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '居民id',
    component: 'Input',
    show: false,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入居民id',
    },
    colProps: { span: 12 },
 },
  {
    field: 'hkType',
    label: '户口类型（农村，城镇）',
    component: 'Select',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请选择户口类型（农村，城镇）',
            options:[
                {
                    label: '农村',
                    value: '农村',
                },
                {
                    label: '城镇',
                    value: '城镇',
                },
            ]
    },
    colProps: { span: 12 },
 },
  {
    field: 'groupNumber',
    label: '组号',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入组号',
    },
    colProps: { span: 12 },
 },
  {
    field: 'hkbNumber',
    label: '户口本号',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入户口本号',
    },
    colProps: { span: 12 },
 },
  {
    field: 'name',
    label: '姓名',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入姓名',
    },
    colProps: { span: 12 },
 },
  {
    field: 'formerName',
    label: '曾用名',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入曾用名',
    },
    colProps: { span: 12 },
 },
  {
    field: 'householder',
    label: '户主',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入户主',
    },
    colProps: { span: 12 },
 },
  {
    field: 'householderRelation',
    label: '户主关系',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入户主关系',
    },
    colProps: { span: 12 },
 },
  {
    field: 'idCard',
    label: '身份证',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入身份证',
    },
    colProps: { span: 12 },
 },
  {
    field: 'issuingAuthority',
    label: '签发机关',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入签发机关',
    },
    colProps: { span: 12 },
 },
  {
    field: 'issuingDate',
    label: '签发日期',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入签发日期',
    },
    colProps: { span: 12 },
 },
  {
    field: 'birthDate',
    label: '出生日期',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入出生日期',
    },
    colProps: { span: 12 },
 },
  {
    field: 'birthPlace',
    label: '出生地',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入出生地',
    },
    colProps: { span: 12 },
 },
  {
    field: 'sex',
    label: '性别',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入性别',
    },
    colProps: { span: 12 },
 },
  {
    field: 'height',
    label: '身高（cm）',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入身高（cm）',
    },
    colProps: { span: 12 },
 },
  {
    field: 'bloodType',
    label: '血型（A/B/AB/O/熊猫）',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入血型（A/B/AB/O/熊猫）',
    },
    colProps: { span: 12 },
 },
  {
    field: 'health',
    label: '健康状况',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入健康状况',
    },
    colProps: { span: 12 },
 },
  {
    field: 'hjAddr',
    label: '户籍所在地',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入户籍所在地',
    },
    colProps: { span: 12 },
 },
  {
    field: 'nation',
    label: '民族（汉/黎等）',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入民族（汉/黎等）',
    },
    colProps: { span: 12 },
 },
  {
    field: 'nativePlace',
    label: '籍贯',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入籍贯',
    },
    colProps: { span: 12 },
 },
  {
    field: 'nowAddr',
    label: '现居地点',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入现居地点',
    },
    colProps: { span: 12 },
 },
  {
    field: 'otherAddr',
    label: '其他地址',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入其他地址',
    },
    colProps: { span: 12 },
 },
  {
    field: 'contactNumber',
    label: '联系电话',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入联系电话',
    },
    colProps: { span: 12 },
 },
  {
    field: 'cultureType',
    label: '文化程度',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入文化程度',
    },
    colProps: { span: 12 },
 },
  {
    field: 'maritalStatus',
    label: '婚姻状况',
    component: 'RadioGroup',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请选择婚姻状况',
            options:[
                {
                    label: '已婚',
                    value: '已婚',
                },
                {
                    label: '未婚',
                    value: '未婚',
                },
                {
                    label: '离婚',
                    value: '离婚',
                },
                {
                    label: '丧偶',
                    value: '丧偶',
                },
            ]
    },
    colProps: { span: 12 },
 },
  {
    field: 'militaryServiceStatus',
    label: '兵役状况',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入兵役状况',
    },
    colProps: { span: 12 },
 },
  {
    field: 'religion',
    label: '宗教信仰',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入宗教信仰',
    },
    colProps: { span: 12 },
 },
  {
    field: 'profession',
    label: '职业（xx）',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入职业（xx）',
    },
    colProps: { span: 12 },
 },
  {
    field: 'politicsStatus',
    label: '政治面貌',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入政治面貌',
    },
    colProps: { span: 12 },
 },
  {
    field: 'remark',
    label: '备注',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入备注',
    },
    colProps: { span: 12 },
 },
  {
    field: 'hjStatus',
    label: '户籍状态',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入户籍状态',
    },
    colProps: { span: 12 },
 },
  {
    field: 'registDate',
    label: '登记日期',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入登记日期',
    },
    colProps: { span: 12 },
 },
  {
    field: 'familyId',
    label: '家庭id',
    component: 'Select',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请选择家庭id',
            options:[
            ]
    },
    colProps: { span: 12 },
 },
  {
    field: 'isDifficultGroup',
    label: '是否困难群体',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入是否困难群体',
    },
    colProps: { span: 12 },
 },
  {
    field: 'age',
    label: '年龄',
    component: 'Input',
    show: true,
    required: true,

    componentProps: {
        disabled: false,
        placeholder: '请输入年龄',
    },
    colProps: { span: 12 },
 },
  {
    field: 'employmentStatus',
    label: '就业状况（失业、在业）',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入就业状况（失业、在业）',
    },
    colProps: { span: 12 },
 },
  {
    field: 'isDisability',
    label: '是否残疾（0-false 1-true）',
    component: 'RadioGroup',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请选择是否残疾（0-false 1-true）',
            options:[
                {
                    label: '是',
                    value: '0',
                },
                {
                    label: '否',
                    value: '1',
                },
            ]
    },
    colProps: { span: 12 },
 },
  {
    field: 'disabilityLevel',
    label: '残疾等级（A/B/C/暂无等）',
    component: 'Input',
    show: true,
    required: false,

    componentProps: {
        disabled: false,
        placeholder: '请输入残疾等级（A/B/C/暂无等）',
    },
    colProps: { span: 12 },
 },
];
